<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title th:text="${movie_name}">Movie</title>
    <link href="/image/title.ico" rel="icon"/>
    <link href="/css/all.css" rel="stylesheet"/>
    <link href="/css/movie/searchMovieResult.css" rel="stylesheet"/>
    <script src="/js/jquery-3.0.0.js"></script>
</head>
<body>
<header th:include="header :: copy"></header>
<div class="all_content">
    <main>
        <div th:with="movie=${movie}">
            <div class="search_movie_result" th:each="o:${movie.getSubjects()}">
                <div th:with="result = ${o.getSubject()}">
                    <div class="search_movie_result_img">
                        <a th:href="'/search/movie/information?id='+${result.getId()}">
                            <img src="/image/1.jpg" th:with="s=${result.getImages().get('medium')}" th:src="${s.replaceFirst('http:','').replaceFirst('https:','')}"
                                 th:alt="${result.getTitle()}"/>
                        </a>
                    </div>
                    <div class="search_movie_result_information">
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_name_1">电影名</span>:
                            <span class="search_movie_result_information_name_2">
                            <a th:href="'/search/movie/information?id='+${result.getId()}"
                               th:text="${result.getTitle()}">来自WSK的爱</a>
                        </span>
                        </div>
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_name_1">外语名</span>:
                            <span class="search_movie_result_information_name_2">
                            <a th:href="'/search/movie/information?id='+${result.getId()}"
                               th:text="${result.getOriginal_title()}">来自WSK的爱</a>
                        </span>
                        </div>
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_director_1">导演</span>:
                            <span class="search_movie_result_information_director_2"
                                  th:each="director:${result.getDirectors()}">
                            <a th:text="${director.getName()}" th:href="'/celebrity/'+${result.getId()}">
                                SK.W
                            </a>
                        </span>
                        </div>
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_cast_1">主演</span>:
                            <span class="search_movie_result_information_cast_2" th:each="cast:${result.getCasts()}">
                            <a th:text="${cast.getName()}+' / '" th:href="'/celebrity/'+${result.getId()}">
                                SK.W
                            </a>
                        </span>
                        </div>
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_name_1">类型</span>:
                            <span class="search_movie_result_information_name_2" th:each="gen:${result.getGenres()}">
                            <span th:text="${gen}+' / '">
                                SK.W
                            </span>
                        </span>
                        </div>
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_name_1">编属</span>:
                            <span th:switch="${result.getSubtype()}">
                        <span class="search_movie_result_information_name_2"
                              th:case="'movie'">电影</span>
                        <span class="search_movie_result_information_name_2"
                              th:case="'tv'">电视剧</span>
                         <span class="search_movie_result_information_name_2"
                               th:case="'*'" th:text="${result.getSubtype()}">电视剧</span>
                            </span>
                        </div>
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_name_1">年份</span>:
                            <span class="search_movie_result_information_name_2"
                                  th:text="${result.getYear()}">2017</span>
                        </div>
                        <div class="search_movie_result_information_1">
                            <span class="search_movie_result_information_name_1">评分</span>:
                            <span class="search_movie_result_information_name_2"
                                  th:text="${result.getRating().getAverage()}">9.9</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    <aside th:include="aside :: aside"></aside>
    <div style="clear: both"></div>
</div>
<footer>
    <div>
        <button class="go_to_top" value=""></button>
    </div>
</footer>
</body>
<script src="/js/all.js"></script>
</html>